using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using BUS;
using Utility;

public partial class Admin_ChiTietKhachHang : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            LoadData();
        }
    }

    private void LoadData()
    {
        try
        {
            int id = int.Parse(Request.QueryString["id"]);

            tbKhachHangEntities KhachHang = tbKhachHangBUS.GetByID(id);
            lit_MaKH.Text = KhachHang.MaKH.ToString();
            lit_TenKH.Text = KhachHang.HoTen.ToString();
            lit_GioiTinh.Text = KhachHang.GioiTinh.ToString();
            lit_TaiKhoan.Text = KhachHang.TaiKhoan.ToString();
            lit_MatKhau.Text = KhachHang.MatKhau.ToString();
            lit_Email.Text = KhachHang.Email.ToString();
            lit_DiaChi.Text = KhachHang.DiaChi.ToString();
            lit_DienThoai.Text = KhachHang.DienThoai.ToString();
        }
        catch
        {
            Response.Redirect("~/Admin/DanhSachKhachHang.aspx");
        }

    }
}
